package com.dbsop.domain;

import com.dbsop.common.enums.Order;

import java.util.ArrayList;
import java.util.List;

/**
 * 排序
 */
public class EsOrder {

    private List<String> fields = new ArrayList<String>();

    private Order order;

    public EsOrder(List<String> fields, Order order) {
        this.fields = fields;
        this.order = order;
    }

    public EsOrder(String field, Order order) {
        this.fields = new ArrayList<String>();
        this.fields.add(field);
        this.order = order;
    }

    public EsOrder(Order order) {
        this.order = order;
    }

    public List<String> getFields() {
        return fields;
    }

    public void setFields(List<String> fields) {
        this.fields = fields;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }
}
